Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand long running timer functionality to WaitForExternalEvent #1550

Merged
merged 2 commits into from
Nov 6, 2020

Conversation

ConnorMcMahon
Copy link
Contributor

Internally WaitForExternalEvent with a timeout uses a timer. In v2.3.0
we added support for long-running timers, we just didn't remove the
now unecessary validation from the WaitForExternalEvent API. This PR
validates the scenario with a test and removes this validation.

Note that initially this PR attempted to expand this functionality to
RetryOptions in CallActivity/SubOrchestrationWithRetry, but
unfortunately the timer used by that retry is lower level than the
Durable Functions layer, meaning we can't use our long-running support.

Addresses #1538

Internally WaitForExternalEvent with a timeout uses a timer. In v2.3.0
we added support for long-running timers, we just didn't remove the
now unecessary validation from the WaitForExternalEvent API. This PR
validates the scenario with a test and removes this validation.

Note that initially this PR attempted to expand this functionality to
RetryOptions in CallActivity/SubOrchestrationWithRetry, but
unfortunately the timer used by that retry is lower level than the
Durable Functions layer, meaning we can't use our long-running support.

Addresses #1538
Copy link
Contributor

@davidmrdavid davidmrdavid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks mostly good to me, assuming the CI is passing!
I left some suggestions to improve readability and maintainability moving forward, mostly around adding more comments. Please review them when you get the chance ⚡

Copy link
Collaborator

@bachuv bachuv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

test/FunctionsV2/LongTimerTests.cs Outdated Show resolved Hide resolved
Copy link
Contributor

@davidmrdavid davidmrdavid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Found a small typo, but it's non-blocking. :shipit:


private bool ValidOutOfProcTimer(DateTime fireAt, out string errorMessage)
// We now have built in long-timer support for C#, but in some scenarios, such as out-of-proc,
// we may still need to enforce this limitations until the solution works there as well.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: this -> these

@ConnorMcMahon ConnorMcMahon merged commit 6c7873d into dev Nov 6, 2020
@ConnorMcMahon ConnorMcMahon deleted the ExpandLongTimerSupport branch November 6, 2020 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants